//
//  MyHandle.h
//  RedManStock
//
//  Created by lanou3g on 15/7/18.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef void(^requestDicSuccess)(NSDictionary *responseDic);
typedef void(^requestDicError)(NSError *error);
typedef NSDictionary *(^requestParameter)();

@interface MyHandle : NSObject

@property (nonatomic,copy) requestDicSuccess successBlock;
@property (nonatomic,copy) requestDicError errorBlock;
@property (nonatomic,copy) requestParameter parameterBlock;

//+ (MyHandle *)shareHandle;

//返回字符串高度
+ (CGFloat)stringHeight:(NSString *)str
               fontSize:(CGFloat)fontSize
                  width:(CGFloat)width;

/*
 *设置有文字的大菊花
 */
+ (void)setUpMBProgressWithView:(UIView *)view
                           Text:(NSString *)text;

/*获取当前的日历时间
 */
+ (NSDateComponents *)getNowDetailDate;

//通过AFNetWorking 带参数的POST异步请求，得到请求下来的字典;其中parameterBlock中的字典是在外部自己定义的;参数请传问号前面的内容
- (void)requestDataWithURLStr:(NSString *)URLStr
               parameterBlock:(requestParameter)parameterBlock
                     successBlock:(requestDicSuccess)successBlock
                       errorBlock:(requestDicError)errorBlock;


@end
